<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="APIVK,com.vk.api.APIVK,GET,JSON,POST,XML,format,httpMethod,method,addPar,addParArray,init,req" name="keywords">
<title>com.vk.api.APIVK</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'APIVK - Документация apivk';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">apivk.googlecode.com</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/vk/api/APIVK.html&amp;com/vk/api/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;APIVK</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class APIVK"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.vk.api</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class APIVK</td>
</tr>
</table>
<p></p>
  Главный класс библиотеки apivk.
  <p>Единственный обязательный класс в библиотеке.</p>
  <p>Используется для инициализации, генерации сигнатуры, 
  создания объектов <code>URLRequest</code>.</p>
    <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="http://apivk.googlecode.com" target="mm_external">http://apivk.googlecode.com</a>
<br>
<a href="http://vkontakte.ru/pages.php?id=2369282" target="mm_external">http://vkontakte.ru/pages.php?id=2369282</a>
<br>
<a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLRequest.html" target="mm_external">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLRequest.html</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#format">format</a> : String = "XML"<div class="summaryTableDescription">[static]
   Определяет формат возвращаемых данных.</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#httpMethod">httpMethod</a> : String = "POST"<div class="summaryTableDescription">[static]
   Определяет тип HTTP запроса.</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#method">method</a> : String<div class="summaryTableDescription">[static][write-only]
   Задать значение метода API.</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addPar()">addPar</a>(name:String, value:String):void</div>
<div class="summaryTableDescription">[static]
   Добавить параметр в список параметров запроса.</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addParArray()">addParArray</a>(name:String, list:Array):void</div>
<div class="summaryTableDescription">[static]
   Добавить параметр, значение которого есть список значений
      </div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#init()">init</a>(api_url:String, viewer_id:String, api_id:String, secret:String, isTestMode:Boolean = false):void</div>
<div class="summaryTableDescription">[static]
   Инициализация.</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#req()">req</a>():URLRequest</div>
<div class="summaryTableDescription">[static]
   Cоздать объект XMLRequest.</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#GET">GET</a> : String = "GET"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#JSON">JSON</a> : String = "JSON"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#POST">POST</a> : String = "POST"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#XML">XML</a> : String = "XML"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">APIVK</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="format"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">format</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public static var format:String = "XML"</code><p>
   Определяет формат возвращаемых данных.
      </p><p>The default value is <code>'XML'</code>.</p>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../api/APIVK.html#XML" target="">XML</a>
<br>
<a href="../api/APIVK.html#JSON" target="">JSON</a>
</div>
</div>
<a name="httpMethod"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">httpMethod</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static var httpMethod:String = "POST"</code><p>
   Определяет тип HTTP запроса.
      </p><p>The default value is <code>'POST';</code>.</p>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../api/APIVK.html#POST" target="">POST</a>
<br>
<a href="../api/APIVK.html#GET" target="">GET</a>
</div>
</div>
<a name="method"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">method</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>method:String</code>&nbsp;&nbsp;[write-only]<p>
   Задать значение метода API.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set method(value:String):void</code>
<br>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addPar()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addPar</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function addPar(name:String, value:String):void</code><p>
   Добавить параметр в список параметров запроса.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; имя параметра
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:String</code> &mdash; значение параметра
   </td>
</tr>
</table>
</div>
<a name="addParArray()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addParArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function addParArray(name:String, list:Array):void</code><p>
   Добавить параметр, значение которого есть список значений
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; список параметров.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">list</span>:Array</code></td>
</tr>
</table>
</div>
<a name="init()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">init</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function init(api_url:String, viewer_id:String, api_id:String, secret:String, isTestMode:Boolean = false):void</code><p>
   Инициализация.
   </p><p> Необходимо сделать вызов данной прежде, чем обращаться
   каким-либо другим методам библиотеки apivk.</p>
      <p>Если <code>isTestMode</code> задаётся значение <code>false</code>,
   то в качестве <code>viewer_id</code> нужно задавать id владельца
   приложения <code>api_id</code>.</p>
      <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">api_url</span>:String</code> &mdash; адрес сервиса API, по которому необходимо
   осуществлять запросы
      </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">viewer_id</span>:String</code> &mdash; id текущего пользователя, переданный SWF
   посредством flashvars при инициализации.
      </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">api_id</span>:String</code> &mdash; идентификатор приложения, присваивается при создании.
      </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">secret</span>:String</code> &mdash; секрет приложения.
      </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">isTestMode</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; если этот параметр равен true, разрешает
   тестовые запросы к данным приложения. При этом аутентификация
   не проводится и считается, что текущий пользователь – это автор
   приложения. Это позволяет тестировать приложение без загрузки
   его на сайт. По умолчанию <code>false</code>.
   </td>
</tr>
</table>
</div>
<a name="req()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">req</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function req():URLRequest</code><p>
   Cоздать объект XMLRequest.
   </p><p>Использует данные полученные через <code>APIVK.method</code>,
   <code>addPar</code>, <code>addParSafe</code>. После использования
   эти данные удаляются.
      <p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>URLRequest</code> &mdash; HTTP запрос, в соответствии с предыдущими обращениями к классу.
      </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../api/APIVK.html#method" target="">method</a>
<br>
<a href="../api/APIVK.html#addPar()" target="">addPar()</a>
<br>
<a href="../api/APIVK.html#addParSafe()" target="">addParSafe()</a>
</div>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="GET"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">GET</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const GET:String = "GET"</code>
</div>
<a name="JSON"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">JSON</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const JSON:String = "JSON"</code>
</div>
<a name="POST"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">POST</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const POST:String = "POST"</code>
</div>
<a name="XML"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">XML</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const XML:String = "XML"</code>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">v. 0.1.1</center>
</div>
</body>
</html>
<!--v. 0.1.1-->
